Run with SquidGuard
2012/07/09 |
In addition to squidClamav, Run Squid with SquidGuard that is a URL redirector used to use blacklists.
|
|
[1] | Install SquidGuard |
root@lan:~#
root@lan:~# aptitude -y install squidguard mv /etc/squid/squidGuard.conf /etc/squid/squidGuard.conf.bk
root@lan:~#
vi /etc/squid/squidGuard.conf # create new ( most simply setting )
dbhome /var/lib/squidguard/db
logdir /var/log/squid # define category 'deny' dest deny { # define prohibited domain file for 'deny' domainlist deny/domains # define prohibited URL file for 'deny' urllist deny/urls }
acl {
default { # allow except 'deny' pass !deny all # redirect URL redirect http://www.srv.world/error.html } } mkdir /var/lib/squidguard/db/deny
root@lan:~#
vi /var/lib/squidguard/db/deny/domains # write domains you'd like to prohibit to access
yahoo.co.jp
example.com
root@lan:~#
vi /var/lib/squidguard/db/deny/urls # write URLs you'd like to prohibit to access
www.yahoo.co.jp/deny/
www.example.com/ squidGuard -C all root@lan:~# chown -R c-icap:proxy /var/lib/squidguard
root@lan:~#
chown c-icap:proxy /var/log/squid/squidGuard.log
root@lan:~#
vi /etc/squidclamav.conf # line 21: uncomment and change PATH squidguard /usr/bin/squidGuard
/etc/init.d/c-icap restart Restarting c-icap: c-icap. |
[2] | Try to access to the URL set as prohibited domain in [1]. |